#ifndef CHIP_H
#define CHIP_H

#include "circuitcomponent.h"
#include <QString>

class Chip : public CircuitComponent
{
    Q_OBJECT
public:
    explicit Chip(const QString& label = "IC", QGraphicsItem *parent = nullptr);

    QPointF inputPort() const override;
    QPointF outputPort() const override;
    void setLabel(const QString& label);

protected:
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
    QRectF boundingRect() const override;

private:
    QString m_label;
    static constexpr int PIN_SPACING = 20;
};

#endif // CHIP_H
